     /* Warehouse Dashboard CSS */
        @import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');

        body {
            font-family: 'Sarabun', sans-serif !important;
        }

        /* Main Container */
        .dashboard-container {
            min-height: 100vh;
            background-color: #f9fafb;
            font-family: 'Sarabun', sans-serif;
        }

        .dashboard-content {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0px 0px;
        }

        /* Header */
        .dashboard-header {
            text-align: center;
            margin-bottom: 0px;
        }

        .dashboard-header h1 {
            font-size: 2.5rem;
            font-weight: 700;
            color: #111827;
            margin-bottom: 8px;
        }

        .dashboard-header p {
            font-size: 1.125rem;
            color: #6b7280;
        }

        /* Platform Tabs */
        .platform-section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            padding: 24px;
            margin-bottom: 32px;
        }

        .platform-section h2 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #111827;
            margin-bottom: 16px;
        }

        .platform-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .platform-tab {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            background: white;
            color: #374151;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            user-select: none;
        }

        .platform-tab:hover {
            border-color: #d1d5db;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            transform: translateY(-1px);
        }

        .platform-tab.active {
            border-color: #10b981;
            background-color: #10b981;
            color: white;
            box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
        }

        .platform-tab.active .icon {
            filter: brightness(0) invert(1);
        }

        .platform-tab .icon {
            font-size: 1.25rem;
        }

        /* Summary Cards */
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
            margin-bottom: 32px;
        }

        .summary-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            padding: 24px;
            transition: all 0.3s ease;
        }

        .summary-card:hover {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }

        .summary-card-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .summary-card-info h3 {
            font-size: 0.875rem;
            font-weight: 500;
            color: #6b7280;
            margin-bottom: 8px;
        }

        .summary-card-info .number {
            font-size: 1.875rem;
            font-weight: 700;
            color: #111827;
        }

        .summary-card-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .summary-card-icon.blue {
            background-color: #dbeafe;
            color: #1d4ed8;
        }

        .summary-card-icon.green {
            background-color: #dcfce7;
            color: #16a34a;
        }

        .summary-card-icon.emerald {
            background-color: #d1fae5;
            color: #059669;
        }

        .summary-card-icon.yellow {
            background-color: #fef3c7;
            color: #d97706;
        }

        /* Chart Section */
        .chart-section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            padding: 24px;
            height: fit-content;
        }

        .chart-header {
            margin-bottom: 24px;
        }

        .chart-header h2 {
            font-size: 1.25rem;
            font-weight: 600;
            color: #111827;
            margin: 0 0 16px 0;
        }

        .chart-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .date-range {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.875rem;
            color: #374151;
        }

        .date-input {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.875rem;
            color: #374151;
            background: white;
        }

        .date-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .date-range-picker {
            display: flex;
            align-items: center;
            gap: 8px;
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            padding: 4px;
        }

        .date-separator {
            font-size: 0.875rem;
            color: #6b7280;
            font-weight: 500;
        }

        .search-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background-color: #3b82f6;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Sarabun', sans-serif;
        }

        .search-btn:hover {
            background-color: #2563eb;
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
        }

        .search-btn:active {
            transform: translateY(0);
        }

        .search-btn .search-icon {
            font-size: 14px;
        }

        /* Product Summary Section Styles */
        .product-summary-section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            padding: 24px;
            margin-bottom: 32px;
        }

        .summary-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 16px;
        }

        .summary-header h3 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #111827;
            margin: 0;
        }

        .summary-period {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background-color: #f3f4f6;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
        }

        .period-label {
            font-size: 0.875rem;
            color: #6b7280;
            font-weight: 500;
        }

        .period-text {
            font-size: 0.875rem;
            color: #111827;
            font-weight: 600;
        }

        .summary-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 24px;
        }

        .summary-stat-card {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 24px;
            background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
            border: 1px solid #e5e7eb;
            border-radius: 16px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .summary-stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b);
        }

        .summary-stat-card:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            transform: translateY(-4px);
            border-color: #3b82f6;
        }

        .stat-icon {
            font-size: 2.5rem;
            width: 56px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
            border-radius: 16px;
            border: 2px solid #e2e8f0;
            flex-shrink: 0;
        }

        .stat-content {
            flex: 1;
        }

        .stat-label {
            font-size: 0.875rem;
            color: #6b7280;
            margin-bottom: 4px;
        }
        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #111827;
            background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .product-detail-summary {
        }
        .product-detail-summary h4 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #111827;
            margin: 0 0 20px 0;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
            position: relative;
        }
        .product-detail-summary h4::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 60px;
            height: 2px;
            background: linear-gradient(90deg, #3b82f6, #10b981);
        }

        .product-summary-table {
            overflow-x: auto;
        }

        .product-summary-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .product-summary-table th {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            padding: 16px 20px;
            text-align: left;
            font-size: 0.875rem;
            font-weight: 600;
            color: #374151;
            border-bottom: 2px solid #e2e8f0;
            position: relative;
        }

        .product-summary-table th:first-child {
            border-top-left-radius: 8px;
        }

        .product-summary-table th:last-child {
            border-top-right-radius: 8px;
        }

        .product-summary-table td {
            padding: 16px 20px;
            border-bottom: 1px solid #f1f5f9;
            font-size: 0.875rem;
            transition: background-color 0.2s ease;
        }

        .product-summary-table tbody tr:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            transform: scale(1.01);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        .product-summary-table tbody tr {
            transition: all 0.2s ease;
        }

        .product-name-cell {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .product-color-indicator {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            flex-shrink: 0;
            border: 2px solid #ffffff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .product-trend {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.75rem;
        }

        .trend-up {
            color: #10b981;
        }

        .trend-down {
            color: #ef4444;
        }

        .trend-stable {
            color: #6b7280;
        }

        /* Responsive adjustments for summary section */
        @media (max-width: 768px) {
            .summary-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .summary-stats-grid {
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 16px;
            }
            
            .summary-stat-card {
                padding: 20px;
            }
            
            .stat-icon {
                font-size: 2rem;
                width: 48px;
                height: 48px;
            }
            
            .stat-value {
                font-size: 1.25rem;
            }

            .product-summary-section {
                padding: 20px;
            }

            .product-detail-summary {
                padding: 20px;
            }
        }

        .chart-container {
            width: 100%;
        }

        /* Shipping Section Styles */
        .shipping-section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            padding: 24px;
            height: fit-content;
        }

        .shipping-header {
            margin-bottom: 24px;
        }

        .shipping-header h2 {
            font-size: 1.25rem;
            font-weight: 600;
            color: #111827;
            margin: 0;
        }

        .shipping-table {
            width: 100%;
        }

        .shipping-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            border-bottom: 1px solid #f3f4f6;
        }

        .shipping-row.header {
            font-weight: 600;
            color: #374151;
            padding-bottom: 20px;
            margin-bottom: 20px;
            border-bottom: 2px solid #e5e7eb;
            background-color: #f9fafb;
            padding: 16px 20px;
            border-radius: 8px;
        }

        .shipping-row.total {
            padding-top: 20px;
            margin-top: 20px;
            border-top: 2px solid #e5e7eb;
            background-color: #f0f9ff;
            padding: 20px;
            border-radius: 8px;
            font-weight: 600;
        }

        .shipping-row:not(.header):not(.total):hover {
            background-color: #f9fafb;
            border-radius: 8px;
            padding: 16px 20px;
            margin: 0 -20px;
        }

        .carrier-info {
            display: flex;
            align-items: center;
            gap: 16px;
            min-width: 180px;
            flex-shrink: 0;
        }

        .carrier-logo {
            font-size: 2rem;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #f9fafb;
            border-radius: 8px;
            border: 2px solid #e5e7eb;
        }

        .flash-logo {
            background-color: #fef3c7;
            border-color: #f59e0b;
            color: #d97706;
        }

        .kex-logo {
            background-color: #dbeafe;
            border-color: #3b82f6;
            color: #1d4ed8;
        }

        .appointment-logo {
            background-color: #f3e8ff;
            border-color: #8b5cf6;
            color: #7c3aed;
        }

        .carrier-name {
            font-size: 1rem;
            font-weight: 500;
            color: #111827;
        }

        .shipping-data {
            display: flex;
            align-items: center;
            gap: 16px;
            flex: 1;
        }

        .data-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            min-width: 100px;
            flex: 1;
        }

        .data-item .icon {
            font-size: 1.25rem;
            color: #6b7280;
        }

        .data-item .label {
            font-size: 0.75rem;
            color: #6b7280;
            text-align: center;
            line-height: 1.2;
        }

        .data-item .number {
            font-size: 1.25rem;
            font-weight: 700;
            color: #111827;
        }

        .shipping-footer {
            text-align: center;
            padding-top: 20px;
            margin-top: 20px;
            border-top: 1px solid #e5e7eb;
            font-size: 0.875rem;
            color: #6b7280;
        }

        /* Table Section */
        .table-section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
            padding: 24px;
        }

        .table-header {
            margin-bottom: 24px;
        }

        .table-header-content {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .table-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #111827;
            margin: 0;
        }

        .table-filters {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .search-container {
            position: relative;
            max-width: 300px;
        }

        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 0.875rem;
            color: #374151;
            background: white;
        }

        .search-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 16px;
        }

        .status-filter {
            padding: 10px 16px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 0.875rem;
            color: #374151;
            background: white;
            max-width: 200px;
        }

        .status-filter:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .table-container {
            overflow-x: auto;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            background-color: #f9fafb;
            padding: 12px 16px;
            text-align: left;
            font-size: 0.875rem;
            font-weight: 600;
            color: #374151;
            border-bottom: 1px solid #e5e7eb;
        }

        .data-table td {
            padding: 16px;
            border-bottom: 1px solid #f3f4f6;
            vertical-align: top;
        }

        .data-table tbody tr:hover {
            background-color: #f9fafb;
        }

        .product-info {
            display: flex;
            align-items: center;
        }

        .product-image {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            margin-right: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            background: #f9fafb;
            border: 2px solid #e5e7eb;
        }

        .product-details h4 {
            font-size: 0.875rem;
            font-weight: 500;
            color: #111827;
            margin-bottom: 4px;
        }

        .product-details .product-id {
            font-size: 0.875rem;
            color: #6b7280;
        }

        /* Status Badge */
        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
            border: 1px solid;
        }

        .status-badge.normal {
            background-color: #dcfce7;
            color: #16a34a;
            border-color: #bbf7d0;
        }

        .status-badge.low {
            background-color: #fef3c7;
            color: #d97706;
            border-color: #fed7aa;
        }

        .status-badge.out {
            background-color: #fee2e2;
            color: #dc2626;
            border-color: #fecaca;
        }

        /* Responsive Design for Shipping Section */
        @media (max-width: 768px) {
            .shipping-section {
                padding: 16px;
            }
            
            .shipping-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 16px;
                padding: 20px 0;
            }
            
            .shipping-data {
                gap: 16px;
                width: 100%;
                justify-content: space-around;
                flex-wrap: wrap;
            }
            
            .data-item {
                min-width: 80px;
                flex: 0 0 auto;
            }
            
            .carrier-info {
                min-width: auto;
            }
        }

        /* Responsive Design */
        @media (min-width: 640px) {
            .chart-header {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
            }
            
            .table-filters {
                flex-direction: row;
                align-items: center;
            }
            
            .search-input {
                width: 256px;
            }

            .date-range {
                flex-direction: row;
                align-items: center;
                gap: 16px;
            }
        }

        @media (min-width: 1024px) {
            .dashboard-content {
                padding: 0px 0px;
            }
        }

        /* Additional Utility Classes */
        .text-center {
            text-align: center;
        }

        .mb-8 {
            margin-bottom: 32px;
        }

        /* New styles for shipping-chart-container */
        .shipping-chart-container {
            display: grid;
            grid-template-columns: 1fr 1fr; /* Two equal columns */
            gap: 24px;
            margin-bottom: 32px;
        }

        /* Responsive adjustments for shipping-chart-container */
        @media (max-width: 1024px) {
            .shipping-chart-container {
                grid-template-columns: 1fr; /* Stack on smaller screens */
            }
        }

        /* Charts container styles */
        .charts-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-bottom: 32px;
        }

        @media (max-width: 1024px) {
            .charts-container {
                grid-template-columns: 1fr;
            }
        }

        /* Sub number styles for summary cards */
        .sub-number {
            font-size: 0.875rem;
            color: #6b7280;
            margin-top: 4px;
        }

        /* Category logo styles */
        .category-logo {
            background-color: #f3f4f6;
            border-color: #d1d5db;
            color: #374151;
        }

        /* Stats container styles */
        .stats-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .stat-card {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 20px;
            background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }

        .stat-icon {
            font-size: 2rem;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
            border-radius: 12px;
            border: 2px solid #e2e8f0;
            flex-shrink: 0;
        }

        .stat-content {
            flex: 1;
        }

        .stat-label {
            font-size: 0.875rem;
            color: #6b7280;
            margin-bottom: 4px;
            font-weight: 500;
        }

        .stat-value {
            font-size: 1.25rem;
            font-weight: 700;
            color: #111827;
            margin-bottom: 2px;
        }

        .stat-sub {
            font-size: 0.75rem;
            color: #9ca3af;
        }

        @media (max-width: 768px) {
            .stats-container {
                grid-template-columns: 1fr;
            }
        }

        /* ให้เรียงแถวเดียว และเลื่อนแนวนอนได้ถ้าพื้นที่แคบ */
.summary-stats-grid.one-line{
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; /* กันแถบเลื่อนทับเนื้อหา */
}

/* กำหนดความกว้างการ์ดแต่ละใบ (ปรับได้ตามดีไซน์) */
.summary-stats-grid.one-line .summary-stat-card{
  flex: 0 0 280px; /* การ์ดกว้างคงที่เพื่อจัดหนึ่งแถว */
}

.year-select{
  padding:8px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  font-size:0.875rem;
  background:#fff;
  color:#374151;
}
.year-select:focus{
  outline:none;
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,0.1);
}
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);
  white-space:nowrap;
}

