* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
  
    min-height: 100vh;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

header {
    text-align: center;
    padding: 5px 0;
    margin-bottom: 20px;
    position: relative;
}

h3.title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #D4AF37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    text-align: center;
}

.subtitle {
    font-size: 0.6rem;
    color: #a0d2ff;
    margin-bottom: 15px;
}

.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.date-time {
    font-size: 0.9rem;
    font-weight: 500;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.refresh-btn:active {
    transform: scale(0.98);
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.product-grid .product-card { box-sizing: border-box; width: 100% !important; display: flex; flex-direction: row; overflow-x: hidden;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-image-container {
    overflow: visible;
    width: 100%;
    max-width: 180px;
    margin: 0 5px 0 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.product-image {
    width: 100% !important;
    max-width: 100px !important;
    height: auto !important;
    max-width: 160px !important;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-id {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 5px;
    border-radius: 20px;
    font-weight: 400;
    text-align: center;
    width: 100%;
}

.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px !important;
}

.product-name {
    font-size: 0.8rem !important;
    font-weight: 600;
    text-align: center;
    word-wrap: break-word;
    width: 100%;
}

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

.status-normal { color: #4ade80; }
.status-critical { background: #f87171; }
.status-pending { background: #FFA500; }

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-box {
    text-align: left;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}
.stat-label {
    font-size: 0.75rem;
    color:rgb(158, 167, 194);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
}
.stat-gongduan {
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.5;
    margin-left: 5px;
    text-align: left;
}

.product-section-production {
    margin-bottom: 15px;
}

.section-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #a0d2ff;
}

.section-values {
    display: block;
    width: 100%;
}

.section-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    margin:0 2px;
    border-radius: 12px;
    min-width: 60px;
    width: 100%;
    padding: 2px 0;
}

.section-name {
    font-size: 0.8rem;
    color: #ccd6f6;
}

.section-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    min-width: 35px;
    box-sizing: border-box;
    padding: 2px 4px;
}

.section-time.text-muted {
    font-size: 0.75rem;
    line-height: 30px;
    color:rgb(220, 223, 233) !important;
    text-align: right;
    margin-left: auto;
    margin-right:10px;
}

.gongduan-info {
    text-align: left;
    margin-left:10px;
}

.target-center {
    justify-content: center !important;
}
@keyframes ellipsis {
    0% { content: ''; }
    33% { content: '.'; }
    66% { content: '..'; }
    100% { content: '...'; }
}
.status-normal::after, .status-critical::after {
    content: '';
    animation: ellipsis 1.5s infinite;
    margin-left: 5px;
}

.progress-container {
    margin-top: 5px;
    padding: 0 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    position: relative;
}

.progress-normal { background: linear-gradient(90deg, #4ade80, #22c55e); }
.progress-warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-critical { background: linear-gradient(90deg, #f87171, #ef4444); }

.average-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.7);
}

.average-label {
    font-size: 0.7rem;
    margin-top: 5px;
    text-align: right;
    color: #a0d2ff;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.error-message {
    color: #dc2626;
    padding: 20px;
    background-color: #fee2e2;
    border-radius: 8px;
    text-align: center;
    margin: 10px;
}

.product-icon {
    font-size: 1.2rem;
    color: #4facfe;
}

@media (max-width: 768px) { .product-grid { display: flex !important; flex-direction: column !important; width: 100% !important; padding: 0 !important; } .product-card { width: 100% !important; margin: 0 0 15px 0 !important; } .product-image-container { max-width: 120px !important; } .product-content { width: 100% !important; }
    body {
        overflow-x: hidden;
        padding: 0;
    }
    .container {
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }
    .info-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .date-time {
        margin-bottom: 5px;
        text-align: center;
        width: 100%;
    }
    .title {
        font-size: 1.2rem;
        padding: 0 10px;
        text-align: center;
    }
    .product-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 1px;
    margin: 0 0 5px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
    .product-image-container {
        flex-shrink: 0;
        width: 80px !important;
        height: 120px !important;
        margin: 0 4px 0 0;
    }
    .product-content {
        flex-direction: column;
        padding: 0;
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    .stats-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    }
    .stat-box {
    padding: 0;
    font-size: 0.7rem;
    text-align: center;
    word-wrap: break-word;
    overflow: hidden;
    flex: 1 1 50%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    border-radius: 12px;
}
    .status-target-box {
        flex: 1 1 50%;
        min-width: 0;
        max-width: 50%;
    }
    .product-name {
        font-size: 0.8rem;
        margin-bottom: 0;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .stat-value {
        font-size: 0.85rem;
        text-align: center;
        display: block;
        width: 100%;
    }
    .product-image {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 100px !important;
    }
    .current-stock {
        font-size: 0.75rem;
        padding: 2px 0;
        text-align: center;
        word-wrap: break-word;
    }
    .info-bar {
        padding: 8px 10px;
        width: 100%;
        box-sizing: border-box;
        flex-direction: column;
        gap: 8px;
    }
    .date-time {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
    
    .product-grid {
        gap: 8px;
        padding: 0;
    }
    
    .content-container {
        padding: 0 2px;
        width: 100% !important;
    }
    
    .stat-gongduan {
        font-size: 0.8rem;
        word-wrap: break-word;
    }
    
    /* 动态加载内容的响应式调整 */
    .content-section {
        width: 100% !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }
    
    /* 修复嵌套内容的卡片样式 */
    .content-section .product-card {
        max-width: 100% !important;
        margin: 0 0.5% 15px !important;
    }
    
    /* 调整Swpier容器样式 */
    .swiper-container, .swiper-slide {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* 确保所有动态加载内容不溢出 */
    .content-section * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 修复成品库存两列布局 */
    .content-section .inventory-card {
        max-width: calc(50% - 2.5px) !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .info-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .date-time {
        margin-bottom: 5px;
    }
}
.swiper-container {
           
  width: 100%; 
  min-height: 100vh; 
  height: auto; 
  padding-top: 30px; 
}
.swiper-slide { 
    width: 100% !important;
    overflow-x: hidden;
    padding: 5px;
    background: #f5f5f5; 
    min-height: 100vh;
    box-sizing: border-box;
}
.data-card { 
    width: 100%;
    margin: 0 1px 1px;
    box-sizing: border-box;
    background: white;
    border-radius: 6px;
    padding: 5px;
    margin-bottom: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

img, video {
    max-width: 100%;
    height: auto;
}
.content-section {
    width: 100%;
    margin-left: 0;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}
