/* Warehouse Management Styles */

.warehouse-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header Section */
.warehouse-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.header-info p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

.ai-status {
    text-align: right;
}

.last-update {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
}

/* Control Panel */
.control-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.panel-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6c757d;
}

.tab-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Inventory Management */
.inventory-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.warehouse-layout {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.layout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.layout-header h3 {
    margin: 0;
    color: #2c3e50;
}

.layout-controls {
    display: flex;
    gap: 10px;
}

.warehouse-map {
    height: 400px;
    background: #f8f9fa;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.warehouse-zone {
    position: absolute;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.warehouse-zone:hover {
    transform: scale(1.05);
    z-index: 10;
}

.warehouse-zone.high-density {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.warehouse-zone.medium-density {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
}

.warehouse-zone.low-density {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}

.warehouse-zone.empty {
    background: linear-gradient(135deg, #a4b0be, #747d8c);
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.high-density {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.legend-color.medium-density {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
}

.legend-color.low-density {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}

.legend-color.empty {
    background: linear-gradient(135deg, #a4b0be, #747d8c);
}

/* Inventory Overview */
.inventory-overview {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.overview-header h3 {
    margin: 0;
    color: #2c3e50;
}

.overview-actions {
    display: flex;
    gap: 10px;
}

.inventory-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-value.warning {
    color: #f39c12;
}

.stat-value.success {
    color: #27ae60;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Inventory Table */
.inventory-table-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.table-header h3 {
    margin: 0;
    color: #2c3e50;
}

.table-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select, .search-input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.search-input {
    min-width: 200px;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.inventory-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.inventory-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.inventory-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

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

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

.status-badge.out {
    background: #f8d7da;
    color: #721c24;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.action-btn.edit {
    background: #17a2b8;
    color: white;
}

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

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Location Optimization */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.optimization-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.panel-header h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.optimization-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.full-width {
    width: 100%;
}

.optimization-results {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h3 {
    margin: 0;
    color: #2c3e50;
}

.results-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f8f9fa;
    color: #6c757d;
}

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

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

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Comparison Section */
.comparison-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.comparison-header h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.comparison-item {
    text-align: center;
}

.comparison-item h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

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

.metric-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Automation Styles */
.automation-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.process-overview {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.overview-header h3 {
    margin: 0;
    color: #2c3e50;
}

.automation-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    min-width: 120px;
}

.flow-step.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}

.flow-step:not(.active) .step-icon {
    background: #e9ecef;
    color: #6c757d;
}

.step-title {
    font-weight: 600;
    text-align: center;
}

.step-status {
    font-size: 0.8rem;
    opacity: 0.8;
    text-align: center;
}

.flow-arrow {
    font-size: 1.5rem;
    color: #6c757d;
    font-weight: bold;
}

.automation-controls {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.controls-header h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
}

.control-groups {
    display: grid;
    gap: 25px;
}

.control-group {
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.control-group:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.control-header h4 {
    margin: 0;
    color: #2c3e50;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.toggle-switch input:checked + label:before {
    transform: translateX(26px);
}

.control-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
}

/* Automation Performance */
.automation-performance {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.performance-header h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
}

.performance-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.performance-chart {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.performance-chart h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    text-align: center;
    flex-shrink: 0;
}

.performance-chart canvas {
    flex: 1;
    min-height: 0;
    height: 250px !important;
    max-height: 250px;
}

.performance-metrics {
    display: grid;
    gap: 15px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.metric-data {
    flex: 1;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
}

.metric-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 2px;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-change.positive {
    color: #27ae60;
}

.metric-change.negative {
    color: #e74c3c;
}

/* Analytics Dashboard */
.analytics-dashboard {
    display: grid;
    gap: 30px;
}

.metrics-overview {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.metrics-header h3 {
    margin: 0;
    color: #2c3e50;
}

.time-selector select {
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

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

.metric-card.large {
    grid-column: span 1;
    position: relative;
    overflow: hidden;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
}

.metric-header i {
    color: #667eea;
    font-size: 1.2rem;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.metric-trend.positive {
    color: #27ae60;
}

.metric-trend.negative {
    color: #e74c3c;
}

.mini-chart {
    height: 60px !important;
    max-height: 60px;
    opacity: 0.7;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    flex-shrink: 0;
}

.chart-header h4 {
    margin: 0;
    color: #2c3e50;
}

.chart-controls {
    display: flex;
    gap: 5px;
}

.chart-controls button {
    padding: 6px 12px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.chart-controls button.active,
.chart-controls button:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.chart-container canvas {
    flex: 1;
    min-height: 0;
    height: 280px !important;
    max-height: 280px;
}

/* Performance Analysis */
.performance-analysis {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.analysis-header h3 {
    margin: 0;
    color: #2c3e50;
}

.analysis-content {
    display: grid;
    gap: 20px;
}

.analysis-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

.analysis-item.success {
    border-left-color: #27ae60;
}

.analysis-item.warning {
    border-left-color: #f39c12;
}

.analysis-item.info {
    border-left-color: #3498db;
}

.analysis-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.analysis-icon.success {
    background: #27ae60;
}

.analysis-icon.warning {
    background: #f39c12;
}

.analysis-icon.info {
    background: #3498db;
}

.analysis-text h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.analysis-text p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    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 {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

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

.close:hover {
    color: #000;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #27ae60;
    animation: toastSlideIn 0.3s ease;
    max-width: 350px;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    .performance-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .warehouse-container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .panel-tabs {
        justify-content: center;
    }
    
    .tab-btn {
        flex-direction: column;
        gap: 5px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .table-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .process-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .control-settings {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    /* 移动端图表优化 */
    .performance-chart {
        height: 280px;
    }
    
    .performance-chart canvas {
        height: 200px !important;
        max-height: 200px;
    }
    
    .chart-container {
        min-height: 300px;
    }
    
    .chart-container canvas {
        height: 220px !important;
        max-height: 220px;
    }
    
    .mini-chart {
        height: 50px !important;
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .warehouse-header {
        padding: 20px;
    }
    
    .header-info h1 {
        font-size: 2rem;
    }
    
    .inventory-stats {
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    /* 小屏幕图表进一步优化 */
    .performance-chart {
        height: 250px;
        padding: 15px;
    }
    
    .performance-chart canvas {
        height: 180px !important;
        max-height: 180px;
    }
    
    .chart-container {
        min-height: 250px;
        padding: 20px;
    }
    
    .chart-container canvas {
        height: 180px !important;
        max-height: 180px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 