

.modern-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: min-content;
    align-items: start;
    padding: 0;
    margin: 0;
    width: 100%;
}

@media (min-width: 1200px) {
    .modern-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .modern-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 991px) {
    .modern-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* =============================================================================
   增强的卡片样式 - 类似GitHub和LinkedIn的设计
   ============================================================================= */

.modern-card-enhanced,
.modern-card,
.status-timeline {
    background: #ffffff;
    border-radius: 15px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 200px;
    margin-bottom: 0;
}

.modern-card-enhanced:hover,
.modern-card:hover,
.status-timeline:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    border-color: #d1d9e0;
}

/* =============================================================================
   卡片头部区域 - 统一高度设计
   ============================================================================= */

.card-header-enhanced,
.card-header-modern {
    padding: 1.5rem;
    border-bottom: 2px solid #dee2e6;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    min-height: 80px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #495057;
}

.card-header-enhanced .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #24292f;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-header-enhanced .card-subtitle {
    color: #656d76;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* =============================================================================
   卡片内容区域 - 灵活高度
   ============================================================================= */

.card-body-enhanced,
.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content-section {
    margin-bottom: 1.25rem;
}

.card-content-section:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   信息行样式 - 现代化设计
   ============================================================================= */

.info-row-enhanced {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f6f8fa;
    transition: background-color 0.15s ease;
}

.info-row-enhanced:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row-enhanced:hover {
    background-color: #f6f8fa;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 6px;
}

.info-label-enhanced {
    font-size: 0.875rem;
    font-weight: 500;
    color: #656d76;
    min-width: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value-enhanced {
    font-size: 0.9rem;
    color: #24292f;
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}

/* =============================================================================
   卡片底部区域 - 固定高度
   ============================================================================= */

.card-footer-enhanced {
    padding: 1rem 1.5rem;
    background: #f6f8fa;
    border-top: 1px solid #e1e5e9;
    margin-top: auto;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =============================================================================
   状态徽章和标签
   ============================================================================= */

.status-badge-enhanced {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    gap: 0.25rem;
}

.status-badge-enhanced.status-pending {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    color: #ea580c;
    border: 1px solid #fb923c;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.15);
    position: relative;
    overflow: hidden;
}

.status-badge-enhanced.status-pending::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

.status-badge-enhanced.status-pending:hover {
    background: linear-gradient(135deg, #fed7aa 0%, #fb923c 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.25);
}

.status-badge-enhanced.status-progress {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #42a5f5;
}

.status-badge-enhanced.status-completed {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

/* =============================================================================
   图片和媒体内容
   ============================================================================= */

.card-media-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin: 1rem 0;
}

.card-media-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-media-container:hover img {
    transform: scale(1.05);
}

/* =============================================================================
   加载状态和骨架屏
   ============================================================================= */

.card-skeleton {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    padding: 1.5rem;
    min-height: 200px;
}

.skeleton-header {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* =============================================================================
   优化的等待点检状态样式
   ============================================================================= */

.badge.bg-warning {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%) !important;
    color: #ea580c !important;
    border: 1px solid #fb923c;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.15);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.badge.bg-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2.5s infinite;
    z-index: 1;
}

.badge.bg-warning:hover {
    background: linear-gradient(135deg, #fed7aa 0%, #fb923c 100%) !important;
    color: white !important;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.25);
}

.badge.bg-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #86efac 100%) !important;
    color: #16a34a !important;
    border: 1px solid #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
    font-weight: 600;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fca5a5 100%) !important;
    color: #dc2626 !important;
    border: 1px solid #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
    font-weight: 600;
}

#detailStatusBadge.bg-warning {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%) !important;
    color: #ea580c !important;
    border: 1px solid #fb923c;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#detailStatusBadge.bg-warning::before {
    content: '⏳';
    font-size: 1.1em;
}

/* =============================================================================
   优化设备卡片状态头部样式
   ============================================================================= */

.device-card-header.pending {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 50%, #fb923c 100%);
    color: #ea580c;
    border-bottom: 3px solid #fb923c;
    position: relative;
    overflow: hidden;
}

.device-card-header.pending::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

.device-card-header.pending .device-title {
    color: #ea580c;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.device-card-header.pending .device-subtitle {
    color: #c2410c;
    opacity: 0.9;
}

.device-card-header.pending .device-status-icon {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.device-card-header.pending .device-status-icon i {
    color: #ea580c;
    font-size: 1.2em;
}

.device-card-header.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #86efac 50%, #22c55e 100%);
    color: #16a34a;
    border-bottom: 3px solid #22c55e;
}

.device-card-header.completed .device-title {
    color: #16a34a;
    font-weight: 700;
}

.device-card-header.completed .device-subtitle {
    color: #15803d;
    opacity: 0.9;
}

.device-card-header.overdue {
    background: linear-gradient(135deg, #fef2f2 0%, #fca5a5 50%, #ef4444 100%);
    color: #dc2626;
    border-bottom: 3px solid #ef4444;
    animation: urgentBlink 2s infinite alternate;
}

.device-card-header.overdue .device-title {
    color: #dc2626;
    font-weight: 700;
}

.device-card-header.overdue .device-subtitle {
    color: #b91c1c;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes urgentBlink {
    0% {
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    }
}

/* =============================================================================
   响应式优化
   ============================================================================= */

@media (max-width: 576px) {
    .modern-card-enhanced {
        border-radius: 8px;
        min-height: 150px;
    }
    
    .card-header-enhanced,
    .card-body-enhanced {
        padding: 1rem;
    }
    
    .card-footer-enhanced {
        padding: 0.75rem 1rem;
        min-height: 50px;
    }
    
    .info-label-enhanced {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .info-value-enhanced {
        font-size: 0.85rem;
    }
}

/* =============================================================================
   特殊卡片类型
   ============================================================================= */

.modern-card-enhanced.compact {
    min-height: 150px;
}

.modern-card-enhanced.compact .card-header-enhanced {
    min-height: 60px;
    padding: 1rem 1.25rem 0.75rem 1.25rem;
}

.modern-card-enhanced.compact .card-body-enhanced {
    padding: 1rem 1.25rem;
}

.modern-card-enhanced.priority-high {
    border-left: 4px solid #dc3545;
}

.modern-card-enhanced.priority-medium {
    border-left: 4px solid #ffc107;
}

.modern-card-enhanced.priority-low {
    border-left: 4px solid #28a745;
}

/* =============================================================================
   动画和过渡效果
   ============================================================================= */

.card-enter {
    opacity: 0;
    transform: translateY(20px);
    animation: cardEnter 0.3s ease-out forwards;
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   打印样式
   ============================================================================= */

@media print {
    .modern-card-enhanced {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .modern-card-enhanced:hover {
        transform: none;
        box-shadow: none;
    }
}