/* ===== DEVICE TYPE CARDS ===== */
.device-type-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 320px;
    height: auto;
    display: flex;
    flex-direction: column;
}

.device-type-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.device-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.device-type-card:hover::before {
    opacity: 1;
}

/* Device Type Color Themes */
.device-type-water {
    --theme-color: #2196F3;
    --theme-light: #E3F2FD;
    --theme-gradient: linear-gradient(135deg, #2196F3, #21CBF3);
}

.device-type-depot {
    --theme-color: #03A9F4;
    --theme-light: #E1F5FE;
    --theme-gradient: linear-gradient(135deg, #03A9F4, #4FC3F7);
}

.device-type-generator {
    --theme-color: #FF9800;
    --theme-light: #FFF3E0;
    --theme-gradient: linear-gradient(135deg, #FF9800, #FFB74D);
}

.device-type-meter {
    --theme-color: #4CAF50;
    --theme-light: #E8F5E8;
    --theme-gradient: linear-gradient(135deg, #4CAF50, #81C784);
}

.device-type-alarm {
    --theme-color: #F44336;
    --theme-light: #FFEBEE;
    --theme-gradient: linear-gradient(135deg, #F44336, #EF5350);
}

.device-type-hydrophore {
    --theme-color: #9C27B0;
    --theme-light: #F3E5F5;
    --theme-gradient: linear-gradient(135deg, #9C27B0, #BA68C8);
}

.device-type-icm {
    --theme-color: #37474F;
    --theme-light: #ECEFF1;
    --theme-gradient: linear-gradient(135deg, #455A64, #78909C);
}

.device-type-default {
    --theme-color: #607D8B;
    --theme-light: #ECEFF1;
    --theme-gradient: linear-gradient(135deg, #607D8B, #90A4AE);
}

/* Card Header */
.card-header-custom {
    padding: 20px 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.device-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--theme-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.device-icon i {
    font-size: 24px;
    color: #ffffff;
}

.device-type-card:hover .device-icon {
    transform: scale(1.1) rotate(5deg);
}

.device-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--theme-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--theme-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    color: var(--theme-color);
    font-weight: 600;
}

/* Card Content */
.card-content {
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.device-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.device-description {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.device-stats {
    display: flex;
    gap: 20px;
    margin-top: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #95a5a6;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Card Footer */
.card-footer-custom {
    padding: 15px 20px 20px;
    margin-top: auto;
}

.btn-view-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--theme-gradient);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    text-decoration: none;
}

.btn-view-details i {
    transition: transform 0.3s ease;
}

.btn-view-details:hover i {
    transform: translateX(4px);
}

/* Card Overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.device-type-card.loading .card-overlay {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    text-align: center;
    color: var(--theme-color);
}

.overlay-content i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.overlay-content span {
    font-size: 14px;
    font-weight: 500;
}

/* No Devices Card */
.no-devices-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    text-align: center;
    padding: 40px 20px;
}

.no-devices-icon {
    width: 80px;
    height: 80px;
    background: #fff3cd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #856404;
    font-size: 32px;
}

.no-devices-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
}

.no-devices-message {
    color: #6c757d;
    margin-bottom: 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .device-type-card {
        min-height: 280px;
        height: auto;
    }
    
    .device-stats {
        gap: 15px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .device-type-card {
        min-height: 260px;
        height: auto;
    }
    
    .card-header-custom {
        padding: 15px 15px 10px;
    }
    
    .card-content {
        padding: 0 15px;
    }
    
    .card-footer-custom {
        padding: 10px 15px 15px;
    }
}

.card-header {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    color: #333333;
    padding: 12px 15px;
}

.card-title {
    color: #2196F3;
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    padding: 15px;
}

